<?php

namespace app\common\model;

use think\Model;

/**
 * 模型
 */
class RechargeTemplate extends Model
{

    protected $name = 'recharge_template';
    protected $autoWriteTimestamp = false;

    const STATUS_ON = 1;
    const STATUS_OFF = 2;

    /**
     * 获取状态正常的模版
     * @return bool|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function getStatusOnTemplate()
    {
        return self::where('status', self::STATUS_ON)->select();
    }
}
